/*
 * InviteParticipantsService.java
 *
 * Created on 04 April 2006, 11:12
 *
 * To change this template, choose Tools | Options and locate the template under
 * the Source Creation and Management node. Right-click the template and choose
 * Open. You can then make changes to the template in the Source Editor.
 */

package web.services;

//import business.pojos.Meeting;
import se392.ateam2006.meetingmgmt.meeting.MeetingEntity;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import web.util.BusinessFacadeDelegate;

/**
 *
 * @author Phil
 */
public class InviteParticipantsService extends InviteService {
    
    /** Creates a new instance of InviteParticipantsService */
    public InviteParticipantsService() {
    }

    public String executePreDispatch(HttpServletRequest request,
            ServletContext context)
            throws Exception {
        String meetingId = request.getParameter(Service.MEETING_ID);
        BusinessFacadeDelegate delegate = this.getDelegate(request.getSession());
        MeetingEntity meeting = delegate.getMeeting(meetingId);
        request.getSession().setAttribute(Service.ATTRIBUTE_MEETING, meeting);        
        request.getSession().setAttribute("meetingUid", meetingId);
        return "display";
    }
    
    public void executePostDispatch(HttpServletRequest request,
            ServletContext context)
            throws Exception {
        //request.setAttribute(Service.ATTRIBUTE_MEETING, null);
    }
}
